import React, { useState } from 'react';
import {Button, Input, Modal, Segmented} from 'antd';
import { Checkbox } from 'antd';
import FormTable from './form';
const { TextArea } = Input;
const App = (props) => {
    const [isModalOpen, setIsModalOpen] = useState(false);
    const showModal = () => {
        setIsModalOpen(true);
    };

    const handleOk = () => {
        setIsModalOpen(false);
    };

    const handleCancel = () => {
        setIsModalOpen(false);
    };

    React.useImperativeHandle(props.onRef, () => {
        return {
            showModal: showModal,
        };
    });
    return (
        <>
            <Modal title="样本拒签" width={1000} open={isModalOpen} onOk={handleOk} onCancel={handleCancel}>
                <FormTable />
                <div>
                    拒签理由：<TextArea rows={6} />
                </div>
                <div>
                    备注：<TextArea rows={4} />
                </div>
                <div style={{marginTop: '20px'}}>
                    <Checkbox>连续扫描</Checkbox>
                </div>
            </Modal>
        </>
    );
};

export default App;
